{include file="pub_header.htm"}
<div class="out_table">
<table width="100%" cellpadding="6" cellspacing="6" border="0" align="center" class="frame_table">
  <tr>
    <td width="20%" align="center" valign="top" bgcolor="#EEEEEE">
      {include file="pub_submenu.htm"}
    </td>
    <td width="80%" align="center" valign="top" bgcolor="#FFFFFF">

      {if $get.ope == "add"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=trans" target="_self" class="current_place">横向分类</a>
            &raquo; <a href="{$control_admin}?act=trans&ope=add" target="_self" class="current_place">添加横向分类</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=trans" target="_self" class="current_place">横向分类列表</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form id="sort_add" name="sort_add" method="post" action="javascript:void(null);" enctype="multipart/form-data">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="3">添加横向分类</td>
        </tr>
        <tr align="left">
          <td width="20%" class="block_left">名称</td>
          <td width="40%" class="block_right"><input type="text" name="name" maxlength="30" size="50" value="" class="input"></td>
          <td width="40%" class="block_right"><span id="name_return"><span class="prompt_primal">名称</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">简介</td>
          <td class="block_right"><textarea name="brief" rows="6" cols="50" class="textarea"></textarea><br /></td>
          <td class="block_right"><span id="brief_return"><span class="prompt_primal">简介</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">排序</td>
          <td class="block_right"><input type="text" name="rank" maxlength="11" size="50" value="" class="input"></td>
          <td class="block_right"><span id="rank_return"><span class="prompt_primal">排序</span></span></td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="button" id="sort_submit" name="sort_submit" value="添加" class="button"
            onclick="xajax.$('sort_submit').disabled=true;
                     xajax.$('sort_submit').value='请等待...';
                     xajax_submit_form('add',xajax.getFormValues('sort_add'),'sort_submit');">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {elseif $get.ope == "amend"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=trans" target="_self" class="current_place">横向分类</a>
            &raquo; <a href="{$control_admin}?act=trans&ope=amend&trans_id={$get.trans_id}" target="_self" class="current_place">编辑横向分类</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=trans" target="_self" class="current_place">横向分类列表</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form id="sort_amend" name="sort_amend" method="post" action="javascript:void(null);" enctype="multipart/form-data">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="3">编辑横向分类</td>
        </tr>
        <tr align="left">
          <td width="20%" class="block_left">ID</td>
          <td width="40%" class="block_right">{$trans_info.id}</td>
          <td width="40%" class="block_right"></td>
        </tr>
        <tr align="left">
          <td width="20%" class="block_left">名称</td>
          <td width="40%" class="block_right"><input type="text" name="name" maxlength="30" size="50" value="{$trans_info.name|str_entag:'space,br'}" class="input"></td>
          <td width="40%" class="block_right"><span id="name_return"><span class="prompt_primal">名称</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">简介</td>
          <td class="block_right"><textarea name="brief" rows="6" cols="50" class="textarea">{$trans_info.brief|str_entag}</textarea><br /></td>
          <td class="block_right"><span id="brief_return"><span class="prompt_primal">简介</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">排序</td>
          <td class="block_right"><input type="text" name="rank" maxlength="11" size="50" value="{$trans_info.rank}" class="input"></td>
          <td class="block_right"><span id="rank_return"><span class="prompt_primal">排序</span></span></td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="button" id="sort_submit" name="sort_submit" value="编辑" class="button"
            onclick="xajax.$('sort_submit').disabled=true;
                     xajax.$('sort_submit').value='请等待...';
                     xajax_submit_form('amend',xajax.getFormValues('sort_amend'),'sort_submit');">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {else}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=trans" target="_self" class="current_place">横向分类管理</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=trans&ope=add" target="_self" class="current_place">添加横向分类</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="4">横向分类列表</td>
        </tr>
        <tr class="block_title">
          <td width="5%" nowrap>ID</td>
          <td width="65%" align="left" nowrap>名称</td>
          <td width="10%" nowrap>排序</td>
          <td width="20%" nowrap>操作</td>
        </tr>
        {foreach name=trans_list from=$trans_list item=item}
        <tr align="center" class="block_list" onmouseover="this.className='block_list_over'" onmouseout="this.className='block_list'">
          <td nowrap>{$item.id}</td>
          <td align="left">{$item.name|str_entag:'space,br'}</td>
          <td nowrap>{$item.rank}</td>
          <td nowrap>
            <a href="{$control_admin}?act=trans&ope=amend&trans_id={$item.id}" target="_self"><img src="{$dir_images_admin}/icon_edit.gif" border="0" alt="改" title="修改" /></a>
            <a href="{$control_admin}?act=trans&ope=del&trans_id={$item.id}" target="_self" onClick="return confirm('真的要删除记录?')"><img src="{$dir_images_admin}/icon_delete.gif" border="0" alt="删" title="删除记录"></a>
          </td>
        </tr>
        {/foreach}
      </table>
      </div>
      {/if}

    </td>
  </tr>
</table>
{include file="pub_footer.htm"}